package gamePlay;

import java.util.ArrayList;
import java.util.Scanner;


public class main {
	public static void main(String [] args){
		
		/*
		CODE FOR AFTER SERVER AND SUCH GETS SET UP SO MULTIPLE CLIENTS CAN CONNECT TO EACHOTHER
		Scanner scan = new Scanner(System.in);
		System.out.println("Would you like to create a 'game' or are you a 'player'?");
		String s = scan.next();
		Game g = new Game("Riley", 3);
		if(s.equals("game")){
			/*
			System.out.println("What would you like to name your game?");
			String name = scan.next();
			System.out.println("And how many players would you like in your game?");
			int players = scan.nextInt();
			Game g = new Game(name, players);
			System.out.println("Sorry, that isn't working currently.");
		}
		else if(s.equals("player")){
			System.out.println("What is your name?");
			String name = scan.next();
			Player p = new Player(name);
			System.out.println("Hello " + p.getPlayer_name() + "!  What is the name of the game you would like to join?");
			String gname = scan.next();
			System.out.println("That isn't working currently - we need to figure out how to setup multiple clients connecting to eachother." +
					"  I'm going to add you to the game 'Riley' instead.");
			System.out.println(p.joinGame(g));
			while(true);
		}
		else{
			System.out.println("Yeah... so that wasn't an option... wait till the GUI comes out so you can " +
					"click buttons instead of reading and typing...");
		}
		*/
		
		
		
		
		
		/* CONCEPT TESTING*/
		Game g = new Game("Frank", 3);
		Player p1 = new Player("Spencer");
		Player p2 = new Player("Scott");
		Player p3 = new Player("Enzo");
		Player p4 = new Player("Eric");
		
		String s1 = p1.joinGame(g);
		String s2 = p2.joinGame(g);
		String s3 = p3.joinGame(g);
		String s4 = p4.joinGame(g);
		
		System.out.println(s1);
		System.out.println(s2);
		System.out.println(s3);
		System.out.println(s4);

		System.out.println();
		
		ArrayList<Player> list = g.getPlayers();
		for(int i = 0; i < list.size(); i++){
			System.out.println(list.get(i).getPlayer_name());
		}
		
		System.out.println();

		System.out.println(p1.getGame_chips());
		System.out.println(p1.getPermanent_chips());
		System.out.println();
		System.out.println(p2.getGame_chips());
		System.out.println(p2.getPermanent_chips());
		System.out.println();
		System.out.println(p3.getGame_chips());
		System.out.println(p3.getPermanent_chips());
		System.out.println();	
		
		g.displayQuestion();
		p1.submitGuess(25);
		p2.submitGuess(45);
		p3.submitGuess(89);
		g.getGuesses();
		
		p1.placeBet(0, 1);
		p2.placeBet(2, 38);
		p3.placeBet(1, 2);
		g.winnings();
		g.displayAnswer();
		
		
		
		/*ArrayList<Question> question = g.getQuestions();
		for(int i = 0; i < question.size(); i++){
			System.out.println(question.get(i).getText() + "     " + question.get(i).getAnswer());
		}
		g.displayAnswer();
		g.displayAnswer();
		g.displayAnswer();
		System.out.println();
		System.out.println();
		System.out.println();
		
		p1.placeBet(0, 1);
		p2.placeBet(2, 38);
		p3.placeBet(1, 2);
		g.getBets();
		
		g.winnings();*/
		System.out.println(p1.getGame_chips());
		System.out.println(p1.getPermanent_chips());
		System.out.println();
		System.out.println(p2.getGame_chips());
		System.out.println(p2.getPermanent_chips());
		System.out.println();
		System.out.println(p3.getGame_chips());
		System.out.println(p3.getPermanent_chips());
		System.out.println();
		
		// */
	}
}
